package com.gtn.exam.title.core.util;

/**
 * The System defined and widely used list of Constants
 * 
 * @author Rukshan Silva | 13th August 2014
 * @version 1.0.0
 */
public abstract class Constants {

	/*
	 * The User Directory of the Project - This returns the root Directory of the Project
	 */
	private static final String ENVIRONMENT = System.getProperty("os.name");

	/*
	 * The User Directory of the Project - This returns the root Directory of the Project
	 */
	private static final String USER_DIR = System.getProperty("user.dir");

	/*
	 * The Configuration Directory of the Project
	 */
	private static final String CONFIG_DIR = new StringBuilder(USER_DIR).append("/config/").toString();

	/*
	 * The Resources Directory of the Project
	 */
	private static final String RESOURCES_DIR = new StringBuilder(USER_DIR).append("/resources/").toString();
	
	/**
	 * Returns the Files reside in Configuration Directory
	 */
	public interface Config {
		
		/*
		 * Return The LOG4J_PROPERTY_FILE name
		 */
		public static final String LOG4J_PROPERTY_FILE = new StringBuilder(CONFIG_DIR).append("log4J.properties").toString();

		/*
		 * Return The SYSTEM_PROPERTY_FILE name
		 */
		public static final String OS = ENVIRONMENT.toLowerCase().startsWith("windows") ? "windows" : "linux";
		public static final String SYSTEM_PROPERTY_FILE = new StringBuilder(CONFIG_DIR).append(OS)
				.append("/").append("system.properties").toString();
	}
	
	/**
	 * Returns the Files reside in Resources Directory
	 */
	public interface resources {
	
		/*
		 * Return The HIBERNATE_CONFIG_FILE name
		 */
		public static final String OS = ENVIRONMENT.toLowerCase().startsWith("windows") ? "windows" : "linux";
		public static final String HIBERNATE_CONFIG_FILE = new StringBuilder(RESOURCES_DIR).append(OS)
				.append("/").append("hibernate.cfg.xml").toString();

	}
}
